package cn.getech.data.development.entity.flink;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName(value = "bdp_real_flink_node_field")
public class FlinkNodeField implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 节点id 
     */
    @TableField(value = "node_id")
    private Integer nodeId;

    /**
     * 字段名称
     */
    @TableField(value = "field_name")
    private String fieldName;

    /**
     * 字段类型
     */
    @TableField(value = "field_type")
    private String fieldType;

    /**
     * 字段描述
     */
    @TableField(value = "field_alias")
    private String fieldAlias;


    /**
     * 字段描述
     */
    @TableField(value = "field_desc")
    private String fieldDesc;

    /**
     * 字段顺序
     */
    @TableField(value = "field_order")
    private Integer fieldOrder;

    /**
     * 字段表达式
     */
    @TableField(value = "field_expression")
    private String fieldExpression;

    /**
     * 创建者ID
     */
    @TableField(value = "create_per")
    private Long createPer;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新者ID
     */
    @TableField(value = "update_per")
    private Long updatePer;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 删除 1 是,0 否
     */
    @TableField(value = "delete_flag")
    private Integer deleteFlag;

    private static final long serialVersionUID = 1L;

    public void preSave(Long userId) {
        Date now = new Date();
        this.createPer=userId;
        this.updatePer=userId;
        this.updateTime=now;
        this.createTime=now;

    }
}